<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich" 
    xmlns:a4j="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

    <h:form id="paymentForm">

        <rich:panel>

            <div class="dialog">
            <h:panelGroup id="paymentPanel">
               	<h:panelGrid columns="1" rowClasses="prop" columnClasses="name,value">
	                <h:outputLabel value="Select Address" for="address"/>
	                <h:selectOneListbox id="address"  title="Search For Book" style="width:164px"
						value="#{address}" size="1">
						<f:selectItem itemValue="" itemLabel=""/>
					    <f:selectItems value="#{addressSelectList}" />
					</h:selectOneListbox>
                </h:panelGrid>
                
                <h:panelGrid columns="1" rowClasses="prop" columnClasses="name,value">
	                <h:outputLabel value="Select Payment" for="payment"/>
					<h:selectOneRadio id="payment" value="#{payment}" style="width:180px">
						<a4j:support event="onchange" reRender="paymentPanel" action="#{bookMaintain.changePayment()}"></a4j:support>
						<f:selectItem itemLabel="e-bank" itemValue="e-bank" style="width:120px"/>
						<f:selectItem itemLabel="cash" itemValue="cash" style="width:120px"/>
					</h:selectOneRadio>
                </h:panelGrid>
                
                <h:panelGrid columns="1" rowClasses="prop" columnClasses="name,value" rendered="#{payment.equals('e-bank')}">
	                <h:outputLabel value="Select Bank" for="bankRadio"/>
					<h:selectOneRadio id="bankRadio" value="#{bank}" style="width:580px">
						<f:selectItem itemLabel="ICBC" itemValue="ICBC(Industrial and Commercial Bank of China)" style="width:120px"/>
						<f:selectItem itemLabel="ABC" itemValue="ABC(The Agricultural Bank of China)" style="width:120px"/>
						<f:selectItem itemLabel="CCB" itemValue="CCB(China Construction Bank)" style="width:120px"/>
						<f:selectItem itemLabel="CMB" itemValue="CMB(China Merchants Bank)" style="width:120px"/>
						<f:selectItem itemLabel="BOC" itemValue="BOC(Bank of China)" style="width:120px"/>
					</h:selectOneRadio>
                </h:panelGrid>
            </h:panelGroup>

            </div>

        </rich:panel>

        <div class="actionButtons">
            <h:commandButton id="submit" value="Submit" 
            	action="#{bookMaintain.selectPayment()}"/>
        </div>

    </h:form>

 </ui:define>
</ui:composition>
